<?php



defined('_JEXEC') or die;

JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
$netbaseAssets = JURI::root().'media/netbase/';
?>

<script type="text/javascript">
	Joomla.submitbutton = function(task)
	{
		if (task == 'item.cancel' || document.formvalidator.isValid(document.id('item-form'))) {
			<?php echo $this->form->getField('description')->save(); ?>
			Joomla.submitform(task, document.getElementById('item-form'));
		}
		else {
			alert('<?php echo $this->escape(JText::_('COM_NBEXPERTPROFILE_VALIDATION_FORM_FAILED'));?>');
		}
	}
</script>

<form action="<?php echo JRoute::_('index.php?option=com_nbexpertprofile&layout=edit&id='.(int) $this->item->id); ?>" method="post" name="adminForm" id="item-form" class="form-validate">
	<div class="width-60 fltlft">
		<fieldset class="adminform" style="position:relative;">
			<legend><?php echo empty($this->item->id) ? JText::_('COM_NBEXPERTPROFILE_NEW') : JText::sprintf('COM_NBEXPERTPROFILE_EDIT', $this->item->id); ?></legend>
			<ul class="adminformlist">
				<li><?php echo $this->form->getLabel('title'); ?>
				<?php echo $this->form->getInput('title'); ?></li>

				<li><?php echo $this->form->getLabel('alias'); ?>
				<?php echo $this->form->getInput('alias'); ?></li>

				<li><?php echo $this->form->getLabel('catid'); ?>
				<?php echo $this->form->getInput('catid'); ?></li>

				<li><?php echo $this->form->getLabel('published'); ?>
				<?php echo $this->form->getInput('published'); ?></li>

				<li><?php echo $this->form->getLabel('image'); ?>
				<?php echo $this->form->getInput('image'); ?></li>

				<li><?php echo $this->form->getLabel('id'); ?>
				<?php echo $this->form->getInput('id'); ?></li>
				
				<li><?php echo $this->form->getLabel('email'); ?>
				<?php echo $this->form->getInput('email'); ?></li>

				<li><?php echo $this->form->getLabel('telephone'); ?>
				<?php echo $this->form->getInput('telephone_ext'); ?>					
				<?php echo $this->form->getInput('telephone'); ?></li>	
				
				<li><?php echo $this->form->getLabel('address1'); ?>
				<?php echo $this->form->getInput('address1'); ?></li>							
				
				<li><?php echo $this->form->getLabel('address2'); ?>
				<?php echo $this->form->getInput('address2'); ?></li>		
				
				
				<li><?php echo $this->form->getLabel('city'); ?>
				<?php echo $this->form->getInput('city'); ?></li>	
				
				<li><?php echo $this->form->getLabel('country'); ?>
				<?php echo $this->form->getInput('country'); ?></li>	
															
			</ul>
			<img style="position:absolute;right:0;top:0;width:96px;border:1px solid #ccc;padding:1px;margin-right:30px;" id="avatar" name="avatar" src="<?php echo $netbaseAssets?>images/NoPicture.gif" />
			<div class="clr"></div>
			<?php echo $this->form->getLabel('description'); ?>
			<div class="clr"></div>
			<?php echo $this->form->getInput('description'); ?>
			<ul>
				<li><?php echo $this->form->getLabel('twitter_url'); ?>
				<?php echo $this->form->getInput('twitter_url'); ?></li>
				<li><?php echo $this->form->getLabel('facebook_url'); ?>
				<?php echo $this->form->getInput('facebook_url'); ?></li>
				<li><?php echo $this->form->getLabel('linkdin_url'); ?>
				<?php echo $this->form->getInput('linkdin_url'); ?></li>											
			</ul>
			<div class="clr"></div>
			<h4>Addtional files</h4>
			<input type="file" id="file_cv" name="file_cv"/>
		</fieldset>
	</div>

	<div class="width-40 fltrt">
		<?php echo  JHtml::_('sliders.start', 'item-profiler'); ?>

			<?php echo $this->loadTemplate('params'); ?>
		
		<?php echo JHtml::_('sliders.end'); ?>		
		<input type="hidden" name="task" value="" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</form>
<div class="clr"></div>
<script>
function updateAvatar(el){
	alert('hi');
};
</script>
